package com.amsp.oa.oademo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;

@Data
@TableName("archive_borrow")
public class ArchiveBorrow {
    @TableId(type = IdType.AUTO)
    private Long id;

    // 被申请人信息
    private String applicantBusinessDivision;
    private String applicantBusinessDivision2;
    private String applicantBusinessDivision3;

    private String applicantDepartment;
    private String applicantDepartment2;
    private String applicantDepartment3;

    private String applicantPosition;
    private String applicantPosition2;
    private String applicantPosition3;

    private String applicantName;
    private String applicantName2;
    private String applicantName3;

    private String applicantEmployeeNumber;
    private String applicantEmployeeNumber2;
    private String applicantEmployeeNumber3;

    // 申请人信息
    private String requesterBusinessDivision;
    private String requesterDepartment;
    private String requesterPosition;
    private String requesterName;
    private String requesterEmployeeNumber;

    // 申请信息
    private Integer borrowType;
    private String reason;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date applyBorrowDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date expectedReturnDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date applyReviewDate;

    private String copyInfo;

    // 审批信息
    private String presidentApproval;
    private String managementDeptApproval;
    private String generalManagerApproval;
    private String directorApproval;
    private String requesterApproval;

    // 实际操作信息
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date actualBorrowDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date actualReturnDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date actualReviewDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date actualStartDate;

    private String filer;
    private String returner;
    private String borrowReceiver;
    private String operator;
    private String remark;

    // 通用字段
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;

    private String createBy;
    private String updateBy;

    @TableLogic
    private Boolean isDeleted;
}